﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Com.CMS263.PO;
using Com.CMS263.BLL;

namespace Com.CMS263.Web.manage.ManageOrder
{
    /// <summary>
    /// $codebehindclassname$ 的摘要说明
    /// </summary>
    //[WebService(Namespace = "http://tempuri.org/")]
    //[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    public class OrderDel : IHttpHandler
    {

        DealInfoBLL dealbll = new DealInfoBLL();
        public void ProcessRequest(HttpContext context)
        {
            try
            {
                int orderid = Convert.ToInt32(context.Request["id"]);
                DealInfo deal = new DealInfo();
                DealInfo deal2 = new DealInfo();
                deal = dealbll.GetDealInfoById(orderid);
                deal2.Id = deal.Id;
                deal2.AddDate = deal.AddDate;
                deal2.EndDate = deal.EndDate;
                deal2.OrderId = deal.OrderId;
                deal2.TotalPrice = deal.TotalPrice;
                deal2.Type = deal.Type;
                deal2.TypeCon = deal.TypeCon;
                deal2.UserId = deal.UserId;
                deal2.UserName = deal.UserName;
                deal2.State = 0;
                dealbll.entity = deal2;
                bool b = dealbll.UpDate();
                if (b)
                {
                    context.Response.Write("ok");
                }
                else
                { context.Response.Write("error"); }
            }
            catch { }
        }
        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}
